package com.csx.orm.mybatis.diy.mapper;

import com.csx.orm.mybatis.diy.provider.BaseProvider;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * <p> what does this class do ? </p>
 * <p> How does it work ?</p>
 * <p> Why does it do this ?</p>
 *
 * @author cuisongxu
 * @date 2023/11/30 周四 14:09
 */
public interface BaseMapper<T> {

    @SelectProvider(type = BaseProvider.class, method = "insert")
    void insert(T entity);

    @SelectProvider(type = BaseProvider.class, method = "update")
    void update(T entity);

    @SelectProvider(type = BaseProvider.class, method = "get")
    T get(Long id);

    @SelectProvider(type = BaseProvider.class, method = "findAll")
    List<T> findAll();
}
